import request from '@/utils/request'

export function getList(pageNum) {
  return request({
    url: 'admin/role?pageNum=' + pageNum,
    method: 'get',
  })
}

export function getSearchList(data,pageNum) {
  return request({
    url: 'admin/role/search?pageNum=' + pageNum,
    method: 'post',
    data
  })
}

export function add(data) {
  return request({
    url: 'admin/role',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: 'admin/role',
    method: 'put',
    data
  })
}

export function remove(data) {
  return request({
    url: 'admin/role',
    method: 'delete',
    data
  })
}

export function getListWithoutPage() {
  return request({
    url: 'admin/role?isPage=0',
    method: 'get',
  })
}
